<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>LeoVue</title>
    <meta name="description" content="一个简洁的Vue.js组件库">
    <link rel="icon" href="/leovue/icons/57x57.png">
  <link rel="manifest" href="/leovue/manifest.json">
  <meta name="theme-color" content="#F00BA4">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <link rel="apple-touch-icon" href="/leovue/icons/152x152.png">
  <link rel="mask-icon" href="/leovue/icons/safari-pinned-tab.svg" color="#3eaf7c">
  <meta name="msapplication-TileImage" content="/leovue/icons/144x144.png">
  <meta name="msapplication-TileColor" content="#000000">
    
    <link rel="preload" href="/leovue/assets/css/0.styles.2bae9745.css" as="style"><link rel="preload" href="/leovue/assets/js/app.bbd8fb51.js" as="script"><link rel="preload" href="/leovue/assets/js/11.2f2ad536.js" as="script"><link rel="prefetch" href="/leovue/assets/js/3.d3440eb0.js"><link rel="prefetch" href="/leovue/assets/js/1.c0330c93.js"><link rel="prefetch" href="/leovue/assets/js/4.7b6392ae.js"><link rel="prefetch" href="/leovue/assets/js/5.0d24eb3c.js"><link rel="prefetch" href="/leovue/assets/js/6.be3c1ae6.js"><link rel="prefetch" href="/leovue/assets/js/7.0077c48e.js"><link rel="prefetch" href="/leovue/assets/js/8.e9cb4d6e.js"><link rel="prefetch" href="/leovue/assets/js/9.d4e07c75.js"><link rel="prefetch" href="/leovue/assets/js/10.cd18093c.js"><link rel="prefetch" href="/leovue/assets/js/12.0643b7fe.js"><link rel="prefetch" href="/leovue/assets/js/13.a86008f7.js"><link rel="prefetch" href="/leovue/assets/js/14.e103f0c2.js"><link rel="prefetch" href="/leovue/assets/js/15.a1bc812b.js"><link rel="prefetch" href="/leovue/assets/js/16.8b9de87f.js"><link rel="prefetch" href="/leovue/assets/js/17.a58c599d.js">
    <link rel="stylesheet" href="/leovue/assets/css/0.styles.2bae9745.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/leovue/" class="home-link router-link-active"><!----> <span class="site-name">LeoVue</span></a> <div class="links" style="max-width:nullpx;"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="https://www.woodso.com?from=leovue" target="_blank" rel="noopener noreferrer" class="nav-link external">
  西阁码农
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <a href="https://github.com/axolo/leovue" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="https://www.woodso.com?from=leovue" target="_blank" rel="noopener noreferrer" class="nav-link external">
  西阁码农
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <a href="https://github.com/axolo/leovue" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav>  <ul class="sidebar-links"><li><a href="/leovue/" class="sidebar-link">首页</a></li><li><div class="sidebar-group collapsable"><p class="sidebar-heading open"><span>组件</span> <span class="arrow down"></span></p> <ul class="sidebar-group-items"><li><a href="/leovue/api/leo-dialog.html" class="active sidebar-link">leo-dialog</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/leovue/api/leo-dialog.html#示例" class="sidebar-link">示例</a></li><li class="sidebar-sub-header"><a href="/leovue/api/leo-dialog.html#说明" class="sidebar-link">说明</a></li><li class="sidebar-sub-header"><a href="/leovue/api/leo-dialog.html#代码" class="sidebar-link">代码</a></li><li class="sidebar-sub-header"><a href="/leovue/api/leo-dialog.html#属性" class="sidebar-link">属性</a></li><li class="sidebar-sub-header"><a href="/leovue/api/leo-dialog.html#事件" class="sidebar-link">事件</a></li></ul></li><li><a href="/leovue/api/leo-lodop.html" class="sidebar-link">leo-lodop</a></li><li><a href="/leovue/api/leo-export.html" class="sidebar-link">leo-export</a></li><li><a href="/leovue/api/leo-import.html" class="sidebar-link">leo-import</a></li><li><a href="/leovue/api/leo-upload.html" class="sidebar-link">leo-upload</a></li></ul></div></li><li><a href="/leovue/changelog.html" class="sidebar-link">修订</a></li><li><a href="/leovue/postscript.html" class="sidebar-link">后记</a></li></ul> <div class="sidebar-bottom" data-v-50df324a><div class="pages" data-v-50df324a>
    Hosted by <a href="https://pages.github.com" style="font-weight: bold" data-v-50df324a>GitHub Pages</a></div> <div class="google-ads" data-v-50df324a><ins data-ad-client="ca-pub-4521521675997745" data-ad-slot="8498299482" data-ad-format="auto" data-full-width-responsive="true" class="adsbygoogle" style="display:block" data-v-50df324a></ins></div></div></div> <div class="page"> <div class="content"><h1 id="leo-dialog"><a href="#leo-dialog" aria-hidden="true" class="header-anchor">#</a> leo-dialog</h1> <h2 id="示例"><a href="#示例" aria-hidden="true" class="header-anchor">#</a> 示例</h2> <!----> <h2 id="说明"><a href="#说明" aria-hidden="true" class="header-anchor">#</a> 说明</h2> <p>对话框。</p> <p><img src="/leovue/assets/img/leo-dailog.6d956da7.png" alt="对话框"></p> <h2 id="代码"><a href="#代码" aria-hidden="true" class="header-anchor">#</a> 代码</h2> <div class="language-vue extra-class"><pre class="language-vue"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>leo-dialog</span> <span class="token attr-name">:visible</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>visible<span class="token punctuation">&quot;</span></span> <span class="token attr-name">:title</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>title<span class="token punctuation">&quot;</span></span> <span class="token attr-name">@close</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>close<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>main<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>{{content}}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>leo-dialog</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>
      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>label</span> <span class="token attr-name">for</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>title<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>label</span><span class="token punctuation">&gt;</span></span>
      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>text<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>title<span class="token punctuation">&quot;</span></span> <span class="token attr-name">v-model</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>title<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>
      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>label</span> <span class="token attr-name">for</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>content<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>内容<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>label</span><span class="token punctuation">&gt;</span></span>
      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>text<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>content<span class="token punctuation">&quot;</span></span> <span class="token attr-name">v-model</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>content<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>button</span> <span class="token attr-name">@click</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>open<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>开启对话框<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>button</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">&gt;</span></span><span class="token script language-javascript">
<span class="token keyword">import</span> <span class="token punctuation">{</span> LeoDialog <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@axolo/leovue'</span>
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
  components<span class="token punctuation">:</span> <span class="token punctuation">{</span> LeoDialog <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token function">data</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token punctuation">{</span>
      title<span class="token punctuation">:</span> <span class="token string">'Hello'</span><span class="token punctuation">,</span>
      content<span class="token punctuation">:</span> <span class="token string">'LeoVue'</span><span class="token punctuation">,</span>
      visible<span class="token punctuation">:</span> <span class="token boolean">false</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  methods<span class="token punctuation">:</span> <span class="token punctuation">{</span>
    <span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>visible <span class="token operator">=</span> <span class="token boolean">true</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>visible <span class="token operator">=</span> <span class="token boolean">false</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span> <span class="token attr-name">scoped</span><span class="token punctuation">&gt;</span></span><span class="token style language-css">
  <span class="token selector">div</span> <span class="token punctuation">{</span>
    <span class="token property">margin</span><span class="token punctuation">:</span> 5px<span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h2 id="属性"><a href="#属性" aria-hidden="true" class="header-anchor">#</a> 属性</h2> <table><thead><tr><th>名称</th> <th>类型</th> <th>说明</th> <th>默认值</th> <th>必填</th></tr></thead> <tbody><tr><td>title</td> <td>String</td> <td>标题</td> <td>-</td> <td></td></tr> <tr><td>visible</td> <td>Blooean</td> <td>可见性</td> <td>-</td> <td></td></tr></tbody></table> <h2 id="事件"><a href="#事件" aria-hidden="true" class="header-anchor">#</a> 事件</h2> <table><thead><tr><th>名称</th> <th>值</th> <th>说明</th></tr></thead> <tbody><tr><td>close</td> <td><code>false</code></td> <td>发送<code>fasle</code>给父组件关闭对话框</td></tr></tbody></table></div> <div class="page-edit"><!----> <div class="last-updated"><span class="prefix">上次更新: </span> <span class="time">8/20/2018, 9:46:20 PM</span></div></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/leovue/" class="prev router-link-active">
          首页
        </a></span> <span class="next"><a href="/leovue/api/leo-lodop.html">
          leo-lodop
        </a>
        →
      </span></p></div> </div> <!----></div></div>
    <script src="/leovue/assets/js/11.2f2ad536.js" defer></script><script src="/leovue/assets/js/app.bbd8fb51.js" defer></script>
  </body>
</html>
